const { merge } = require('webpack-merge');
const common = require('./webpack.common');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');

module.exports = merge(common, {
  mode: 'production',
  plugins: [
    new CopyPlugin({
      patterns: [
        {
          from: './public',
          to: './',
          toType: 'dir',
          // ignore: [
          //   '.DS_Store',
          //   {
          //     glob: 'index.html',
          //     matchBase: false,
          //   },
          // ],
        },
      ],
    }),
  ],
});
